package com.example.graduation.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * ProjectName graduation
 *
 * @author xieyucan
 * <br>CreateDate 2022/2/11 11:30
 */
@RestController
@RequestMapping("/test")
public class TestController {


    /**
     * @api {POST} /test/xieyucan api文档测试一
     * @apiVersion 1.0.0
     * @apiGroup TestController
     * @apiName test
     * @apiSuccess (响应结果) {String} response
     * @apiSuccessExample 响应结果示例
     * "wN"
     */
    @PostMapping("xieyucan")
    @ResponseBody
    public String test() {
        return "靓仔";
    }


    /**
     * @api {POST} /test/xieyucan1 api文档测试二
     * @apiVersion 1.0.0
     * @apiGroup TestController
     * @apiName test1
     * @apiParam (请求参数) {String} abc
     * @apiParamExample 请求参数示例
     * {
     * abc="谢钰灿大帅哥"
     * }
     * @apiSuccess (响应结果) {String} response
     * @apiSuccessExample 响应结果示例
     * {
     * abc="谢钰灿大帅哥"
     * }
     */
    @PostMapping("xieyucan1")
    @ResponseBody
    public String test1(String abc) {
        abc = "xieyucan";
        return abc;
    }
}
